package com.googlecode.afdbaccess.web.common.json;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

@JsonSerialize(include = Inclusion.NON_NULL)
public class ExtJsJsonResponse {
    private boolean success;
    private Object data;
    
    public ExtJsJsonResponse(boolean success, Object data) {
        this.success = success;
        this.data = data;
    }

    public ExtJsJsonResponse(Object data) {
        this(true, data);
    }
    
    public ExtJsJsonResponse(boolean success) {
        this(success, null);
    }

    public ExtJsJsonResponse() {
        this(true, null);
    }

    public boolean isSuccess() {
        return this.success;
    }
    
    public Object getData() {
        return this.data;
    }
}